<template>
    <GoodsInfo
      :columns="customColumns"
      @history-click="handleHistory"
    />
  </template>
  
  <script setup lang="ts">
  import GoodsInfo from './GoodsInfo.vue'
  
  const customColumns = [
    { prop: 'code', label: '商品编码*', type: 'input', required: true },
    { prop: 'historyPrice', label: '商品名称', type: 'input' },
    { prop: 'wareHHouse', label: '仓库', type: 'select',options: [
          { label: 'CJ仓库', value: 'CJ' },
          { label: 'KJ仓库', value: 'KJ' }
        ] },
    { prop: 'iinstantIInventory', label: '即时库存', type: 'input' },
    { prop: 'unit', label: '单位', type: 'input'  },
    { prop: 'quantity', label: '数量', type: 'input' },
    { prop: 'quote', label: '报价', type: 'input'  },
    { prop: 'taxPrice', label: '含税单价', type: 'input' },
    { prop: 'tax', label:'税额', type: 'input' },
    { prop: 'total', label: '合计', type: 'input'},
  ]
  
  const handleHistory = (row:any) => {
    console.log('查看历史报价:', row)
  }
  </script>